import token from "./token.js"
import user from "./user.js"
import myfetch from "../assets/myfetch"

function getMyFile() {
  let param = {
    id: token.getToken(user.getMyInfo().id)
  }
  return myfetch.myget("/file/getMyFile", param)
}

function getFile(id) {
  let param = {
    id
  }
  return myfetch.myget("/file/getFile", param)
}

function delFile(url, id) {
  let param = {
    url,
    id
  }
  return myfetch.myget("/file/delFile", param)
}
export default {
  getMyFile,
  getFile,
  delFile
}
